using System;
using System.Web;
using System.Web.UI;

namespace ASP
{
  public partial class Index: Page 
  {
      protected void Page_PreInit(object sender, EventArgs e)
      {
          if(Request.Cookies["Theme"] != null)
              Page.Theme = Request.Cookies["Theme"].Value;

          Response.Cookies.Add(new HttpCookie("Theme", Page.Theme));
          //ddlThemes.SelectedValue = Page.Theme;
      }

      protected void Theme_Changed(object sender, EventArgs e)
      {
          //Response.Cookies["Theme"].Value = ddlThemes.SelectedValue;
          Response.Redirect(Request.Url.ToString());
      }
  }
}